package com.gyf.base.common

import android.app.Application
import android.content.Context
import com.gyf.base.injection.component.AppComponent
import com.gyf.base.injection.component.DaggerAppComponent
import com.gyf.base.injection.module.AppModule

class BaseApplication : Application() {
    lateinit var appComponent: AppComponent
    override fun onCreate() {
        super.onCreate();
        initAppInjection();
        context = this;
    }

    private fun initAppInjection() {
        appComponent = DaggerAppComponent.builder().appModule(AppModule(this)).build();
    }

    companion object {
        lateinit var context: Context;
    }
}